<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../common/admin.asp"-->
<%
orderid=request.QueryString("id")
set rs=server.CreateObject("adodb.recordset")
sql="select * from OrderList where [order]='"&orderid&"'"
rs.open sql,conn,1,3
if not rs.eof then	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add</title>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<style>body {background-color: #eaece1;}</style>
</head>

<body>
<div class="main">
  <div class="main-title">操作</div>
  <div class="main-content">
  <table width="100%" border="0" cellspacing="1" cellpadding="3" class="tab">
  <tr>
    <td width="100%" bgcolor="#FFFFFF">
    
   
            
            
            
            
            
            
            
            
            
            
            
            
        <table width="100%" class="table_style">
				<tr class="str">
				  <th colspan="2" bgcolor="#EFEFEF" class="th_1">有缺货商品存在的时候</th>
				  <th colspan="5" align="left" bgcolor="#EFEFEF" class="th_4"><input type="checkbox" name="checkbox" disabled="disabled" <%if rs("Canlackpro")=false then response.Write " checked"%> />
			      有缺货就全部不需要购买</th>
			  </tr>
				<tr class="str">
					<th colspan="2" class="th_1">商品名</th>
					<th width="14%" class="th_4">商品单价</th>
					<th width="7%" class="th_3">数量</th>
					<th width="21%" class="th_3">日本国内运费</th>
					<th width="7%" class="th_4">备注</th>
					<th width="21%" class="th_4">总价格（元）</th>				
				</tr>
                
                
                <%
					set rslist=server.CreateObject("adodb.recordset")
					sql="select * from orderdetail where [order]='"&rs("order")&"'"
					rslist.open sql,conn,1,3
					if not rslist.eof then
					do while not rslist.eof
					   set rsSource=conn.execute("select * from Source where id="&rslist("sid")&"") '来源
					   set rsShop=conn.execute("select * from Shop where sid="&rslist("sid")&"") '店铺
					   set rsproduct=conn.execute("select * from product where pid="&rslist("pid")&"") '产品
					%>
				<tr>
					<td width="7%">
						<img src="<%=rsproduct("pic")%>" width="80" height="80" alt="">
					</td>
					<td width="23%"><a href="/shopping/<%=rsproduct("pid")%>.html" target="_blank"><%=rslist("title")%></a><br /><%if rsShop("typeid")="0" then response.Write "实体店" else response.Write "购物网"%>-<%=rsShop("address")%>-<%=rsShop("title")%></td>
					<td align="center"><%=rslist("price")%>日元</td>
					<td align="center"><%=rslist("qty")%></td>
					<td align="center"><%=rslist("transCost")%>日元</td>
					<td align="center"><%=rslist("content")%></td>
					<td align="center"><%=cdbl(rslist("qty"))*cdbl(rslist("price"))%>日元</td>
				</tr>
                <%
					   set rsproduct=nothing
					   set rsShop=nothing
					   set rsSource=nothing
					rslist.movenext
					loop
					rslist.close
					set rslist=nothing
					end if		 
					%> 
                
                
                
				
			</table>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <table width="100%">
               
               <tr>
					<td bgcolor="#EAECE1">
					留言
					</td>
			  </tr>
               
               
               
			    <%		
				set rsnewx=server.CreateObject("adodb.recordset")
				sql="select id,uid,[Order],[Content],type,isRead,addtime from sms where [order]='"&rs("order")&"' order by id desc"
				rsnewx.open sql,conn,1,3
				if not rsnewx.eof then
				do while not rsnewx.eof 			
				if rsnewx("type")="1" then
				%>
				<tr>
					<td bgcolor="#E1F5FF">
							<p><strong>会员</strong> <%=rsnewx("addtime")%></p>
							<p><%=rsnewx("content")%></p>
					</td>
				</tr>
                <%else%>
                <tr>
					<td class="stable_2_2">
							<p><strong>管理员</strong> <%=rsnewx("addtime")%></p>
							<p><%=rsnewx("content")%></p>
					</td>
				</tr>
                <%
				end if
				rsnewx.movenext
				loop
				rsnewx.close
				set rsnewx=nothing
				end if
				%>
			</table>
            
            
            
			
			<form name="formreg" method="post" action="" class="messageform" onSubmit="return myjobchk();">
				<textarea name="content" class="textarears"></textarea>				
				<input type="submit" value="提交留言" class="submit" />
                <input type="hidden" name="t" value="y" />
			</form>
	
            
            
            
            
    
    </td>
    </tr>
  </table>

</div>
</div>
</body>
</html>
<%

if request.Form("t")="y" then
content=checkstr(inHTML(request.Form("content")))

if content="" then
response.write"<script>alert('内容不能为空');</script>"
response.write"<script>window.history.back(-1);</script>"
response.end
end if

set rsx=server.createobject("adodb.recordset")
sql="select * from sms "
rsx.open sql,conn,1,3
rsx.addnew
rsx("uid")=rs("uid")
rsx("content")=content
rsx("order")=rs("order")
rsx("type")=0
rsx.update
response.write"<script language=JavaScript>{window.alert('提交成功');window.location.href='?id="&rs("order")&"';}</script>"
rsx.close
set rsx=nothing
end if





rs.close
set rs=nothing
end if
%>